package com.cw.base.common.dispatch.listening;

import com.cw.base.common.dispatch.message.Message;
import com.google.common.eventbus.Subscribe;

/**
 * Created on 15/11/10.
 *
 * @author zhangcheng
 */
public abstract class MessageListening<E> {

    private Message message;

    public Message getMessage() {
        return message;
    }

    /**
     * 获取到消息事件，然后分析消息，执行消息
     *
     * @param event 事件
     */
    @Subscribe
    public abstract void listen(E event);

}
